package org.polyforms.repository.spi;

/**
 * Helper for resolving identifier of entity which are persisted by JPA framework.
 * 
 * @author Kuisong Tong
 * @since 1.0
 */
public interface IdentifierHelper {
    /**
     * Get class of identifier.
     */
    Class<?> getIdentifierClass(Class<?> entityClass);

    /**
     * Get name of identifier.
     */
    String getIdentifierName(Class<?> entityClass);

    /**
     * Get identifier of entity instance.
     */
    Object getIdentifierValue(Object entity);
}
